package com.risen.test.service.impl;

import com.risen.test.mapper.UserMapper;
import com.risen.test.pojo.User;
import com.risen.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther lmj
 * @date 2019/7/30
 */

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Integer uuid) {
        return 0;
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    /**
     * 通过主键查询
     * @param uuid
     * @return
     */
    @Override
    public User selectByPrimaryKey(Integer uuid) {
        return userMapper.selectByPrimaryKey(uuid);
    }

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return 0;
    }
}
